<extend name="Base/commoncenter"/>

<block name="body">
    <div class="panel panel-default">
        <!-- Default panel contents -->
        <div class="panel-heading">修改收货地址</div>
        <div class="panel-body">
            <p>修改收货地址</p>
            <form class="form-horizontal" id="addressform" role="form"  action="{:U('myaddressedit')}" method="POST">
                <input type="hidden" name='id' value="{$address.id}">
                <div class="form-group">
                    <label class="col-sm-2 control-label">国家选择</label>
                    <div class="col-sm-10">
                        <select name="countryid" class="form-control" >
                            <foreach name="countrylist" item="vo" >
                                <option value="{$vo.country_id}"  <if condition="$vo.country_id eq $address.countryid ">selected</if>>[{$vo.code}] {$vo.name_chinese}</option>
                            </foreach>     

                        </select>
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-2 control-label">国家</label>
                    <div class="col-sm-10">
                        <input type="text" class="form-control" name="country" placeholder="国家名称" datatype="*" nullmsg="请填写国家名称！" value="{$address.country}">
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-2 control-label">省/州</label>
                    <div class="col-sm-10">
                        <input type="text" class="form-control" name="province" placeholder="省/州名称" datatype="*" nullmsg="请填写省/州名称！" value="{$address.province}">
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-2 control-label">城市</label>
                    <div class="col-sm-10">
                        <input type="text" class="form-control" name="city" placeholder="城市名称" datatype="*" nullmsg="请填写城市名称！" value="{$address.city}">
                    </div>
                </div>

                <div class="form-group">
                    <label class="col-sm-2 control-label">详细的地址</label>
                    <div class="col-sm-10">
                        <input type="text" class="form-control" name="location" placeholder="详细的街道地址" datatype="*" nullmsg="请填写详细的地址！" value="{$address.location}">
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-2 control-label">邮政编码</label>
                    <div class="col-sm-10">
                        <input type="text" class="form-control" name="zipcode" placeholder="邮政编码" datatype="*" nullmsg="请填写邮政编码！" value="{$address.zipcode}">
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-2 control-label">收货人姓名</label>
                    <div class="col-sm-10">
                        <input type="text" class="form-control" name="name" placeholder="收货人姓名" datatype="*" nullmsg="请填收货人姓名！" value="{$address.name}">
                    </div>
                </div>
                <div class="form-group">
                    <label class="col-sm-2 control-label">收货人电话</label>
                    <div class="col-sm-10">
                        <input type="text" class="form-control" name="phone" placeholder="收货人电话" datatype="*" nullmsg="请填收货人电话！" value="{$address.phone}">
                    </div>
                </div>
                <div class="form-group">
                    <div class="col-sm-offset-2 col-sm-10">
                        <button type="submit" class="btn btn-success"> <span class="glyphicon glyphicon-book"></span> 保存修改 </button>
                    </div>
                </div>
            </form>
            <!------------------->
        </div>
        <script>
            $("#addressform").Validform();
        </script>
       
    </div>
</block>